﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GameLayer;
using GameBase;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework;

namespace GameCharacter
{
    public abstract class MyCharacter : Character
    {
        
        public int Score { get; set; }
        public MyCharacter(ContentManager content)
            : base(content)
        {
            Initialize();
        }

        public void Initialize()
        {
            this.Blood = 2*MAX_BLOOD;
            this._index = 0;
            this.Enable = this.Visible = true;
            this.Power = 5;
        }

        protected override void UpdateEntitys(Microsoft.Xna.Framework.GameTime gameTime, object extraData)
        {
            base.UpdateEntitys(gameTime, extraData);
            Current.Update(gameTime);
            if (IsDying() || IsAttacking())
            {
                this.Current.NextFrame();
            }
        }

        private int _live = 1;

        public int Live
        {
            get { return _live; }
            set { _live = value; }
        }
    }
}